package com.sinoglobal.dumping.dumplingtype;

import com.sinoglobal.dumping.activity.Dumpling_MainActivity;
import com.sinoglobal.dumping.fragment.Dumpling_HomeFragment;
import com.sinoglobal.dumping.util.Dumpling_HttpMethodSet;

import static com.sinoglobal.dumping.base.Dumpling_SinoConstans.DUMPLING_COUPON;
import static com.sinoglobal.dumping.util.DumplingUtils.getCoupon;

/**
 * Created by KeZhuang on 2016/1/26.
 */
public class DumplingTypeCoupon extends AbsDumplingType {

    public DumplingTypeCoupon(Dumpling_HomeFragment fragment) {
        super(fragment);
    }

    @Override
    public void operation() {
        int couponCount = getCoupon(mContext);
        couponCount++;//增加优惠券数量并存储
        putCache( DUMPLING_COUPON, couponCount);
        Dumpling_HttpMethodSet.getShareContent(mContext,Dumpling_MainActivity.TEMP_ID_COUPON,
                mDumpling.getUserImg(),
                mDumpling.getPutUser(),
                mDumpling.getPrizeInfo(),
                ""
        );
    }
}
